import NotFound from '../NotFound'
import NewsList from '../NewsList'
import NewsContent from '../NewsContent'

import Coma from '../Coma';
import Comb from '../Comb'
import { Navigate } from 'react-router-dom'


let routersconfig = [{
  path: "/list",
  element: <NewsList />,
  children: [
    {
      path: "coma",
      element: <Coma />
    },
    {
      path: "comb",
      element: <Comb />
    },
    {
      index: true,
      element: <Navigate to="/list/coma" />
    }
  ]
}, {
  path: "/detail/:id",
  element: <NewsContent />

}, {
  path: "*",
  element: <NotFound />
}, {
  index: true,
  element: <Navigate to="/list" />
}]

export default routersconfig;